package ipebg.mzk.facade.entity;

import ipebg.mzk.facade.enums.LogLevel;

import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

@Document(collection="logMongo")
public class LogMongo implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -9086744984214220779L;

	@Id
	private String id;
	
	private String logLevel;
	
	private String message;
	
	public LogMongo(){};
	
	public LogMongo(LogLevel logLevel,String message){
		this.id=UUID.randomUUID().toString();
		this.logLevel=logLevel.toString();
		this.message=message;
		this.createDate=new Date();
	}
	
	public LogMongo(String id,String logLevel,String message,Date createDate){
		this.id=id;
		this.logLevel=logLevel;
		this.message=message;
		this.createDate=createDate;
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getLogLevel() {
		return logLevel;
	}

	public void setLogLevel(String logLevel) {
		this.logLevel = logLevel;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	private Date createDate;
}
